import React from 'react';

import './index.css'

const Index = (props) => {

    const { data } = props

    return (
        <div className='todo-item'>
            <div className="checkbox">
                <input type='checkbox' checked={data.completed} />
            </div>
            <div className="content"
                style={{ 'textDecoration': data.completed ? 'line-through' : 'none' }}
            >{data.content}</div>
            <div className="operation">
                <button className='see'>查看</button>
                <button className='edit'>编辑</button>
                <button className='delete'>删除</button>
            </div>
        </div>
    );
};

export default Index;